package com.flurry.android;

import android.os.AsyncTask;
import java.util.HashMap;
import org.apache.http.HttpResponse;
import org.apache.http.StatusLine;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.ByteArrayEntity;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpParams;

public class FlurryDataSenderAsyncOperation extends AsyncTask<HashMap<String, Object>, Void, HttpResponse>
{
  private String gh = null;
  private FlurryDataSenderHandler ix = null;

  protected HttpResponse doInBackground(HashMap<String, Object>[] paramArrayOfHashMap)
  {
    try
    {
      this.ix = ((FlurryDataSenderHandler)paramArrayOfHashMap[0].get("del"));
      this.gh = ((String)paramArrayOfHashMap[0].get("id"));
      String str = (String)paramArrayOfHashMap[0].get("url");
      ByteArrayEntity localByteArrayEntity = new ByteArrayEntity((byte[])paramArrayOfHashMap[0].get("data"));
      localByteArrayEntity.setContentType("application/octet-stream");
      HttpPost localHttpPost = new HttpPost(str);
      localHttpPost.setEntity(localByteArrayEntity);
      BasicHttpParams localBasicHttpParams = new BasicHttpParams();
      HttpConnectionParams.setConnectionTimeout(localBasicHttpParams, 10000);
      HttpConnectionParams.setSoTimeout(localBasicHttpParams, 15000);
      localHttpPost.getParams().setBooleanParameter("http.protocol.expect-continue", false);
      HttpResponse localHttpResponse = ch.a(localBasicHttpParams).execute(localHttpPost);
      return localHttpResponse;
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
    }
    return null;
  }

  protected void onPostExecute(HttpResponse paramHttpResponse)
  {
    if (paramHttpResponse != null);
    try
    {
      if (paramHttpResponse.getStatusLine() == null)
      {
        this.ix.onServerError(this.gh);
        return;
      }
      StatusLine localStatusLine = paramHttpResponse.getStatusLine();
      int i = localStatusLine.getStatusCode();
      String str = localStatusLine.getReasonPhrase();
      this.ix.onResponse(i, str, this.gh);
      return;
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
    }
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.flurry.android.FlurryDataSenderAsyncOperation
 * JD-Core Version:    0.6.2
 */